Skip to content

Player Hidden Keywords related to SearchLibrary#10219

Draft
kojotak wants to merge 4 commits intoCard-Forge:masterfrom
kojotak:issue/4760/searchLibrary
Draft

Player Hidden Keywords related to SearchLibrary#10219
kojotak wants to merge 4 commits intoCard-Forge:masterfrom
kojotak:issue/4760/searchLibrary

Conversation

@kojotak
Copy link
Copy Markdown
Contributor

@kojotak kojotak commented Mar 30, 2026

An attempt to refactor 3 hidden player keywords related to "search library" from #4760 :

  • "LimitSearchLibrary"
  • "CantSearchLibrary"
  • "Spells and abilities you control can't cause you to search your library."

Tested using Stoneforge Mystic, Mindlock Orb, Ashiok, Dream Render, Aven Mindcensor. Example of applying library search limit of 4 cards:

image

Types:Creature Cat Cleric
PT:2/2
S:Mode$ Continuous | Affected$ Player | AddKeyword$ CantSearchLibrary | IgnoreEffectCost$ 2 | Description$ Players can't search libraries. Any player may pay {2} for that player to ignore this effect until end of turn.
S:Mode$ CantSearchLibrary | ValidPlayer$ Player | IgnoreEffectCost$ 2 | Description$ Players can't search libraries. Any player may pay {2} for that player to ignore this effect until end of turn.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn‘t work

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kojotak check "Volrath's Curse" for both Continuous and other modes

in this case, it should be something like this:
Mode$ Continuous,CantSearchLibrary | Affected$ Player | ValidPlayer$ Player | IgnoreEffectCost$ 2

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good hint. It was also neccessary to check getIgnoreEffectPlayers in cantSearchLibrary so it finally works.

Tested:

  • payed 2R for ignore effect
  • 2W for Stoneforge mystic - confirm trigger
  • select an equipment from library
image

@kojotak kojotak marked this pull request as draft March 31, 2026 07:33
@kojotak kojotak force-pushed the issue/4760/searchLibrary branch from 496b3a5 to 98f3002 Compare March 31, 2026 18:26
}
return targetPlayer == null || !targetPlayer.equals(sa.getActivatingPlayer())
|| !hasKeyword("Spells and abilities you control can't cause you to search your library.");
|| !StaticAbilityCantSearchLibrary.cantCauseToSearchLibrary(this);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should just use the same method above so it can be more dynamic

Copy link
Copy Markdown
Contributor Author

@kojotak kojotak Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean:

  • remove the cantCauseToSearchLibrary() method completely
  • add check for CantCauseToSearchLibrary mode into cantSearchLibrary()?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's just a slightly more specific variant, not a different mode
we usually have one entry point, so scripts can just use params for their needs

K:Flash
K:Flying
S:Mode$ Continuous | Affected$ Player.Opponent | AddKeyword$ LimitSearchLibrary | Description$ If an opponent would search a library, that player searches the top four cards of that library instead.
S:Mode$ LimitSearchLibrary | ValidPlayer$ Player.Opponent | LimitNum$ 4 | Description$ If an opponent would search a library, that player searches the top four cards of that library instead.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically this is a replacement effect
not sure yet if the static approach is better for both

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants